The present invention relates to an image forming apparatus, a print control method and a control program. Especially, the present invention relates to an image forming apparatus for printing XPS (XML Paper Specification) data, and a print control method and a control program therefor.
Printing apparatuses (hereafter, referred to image forming apparatuses), such as printers and digital MFPs (Multi-Functional Peripherals) have been widely used. In the case where such an image forming apparatus is used as a network printer, firstly, document data is produced by application software installed in a host computer connected to a network. Subsequently, the document data is converted into print data of the page description language (PDL) format by a device driver (printer driver) installed in the host computer, and is transmitted to the image forming apparatus. Then, the image forming apparatus analyzes the print data and outputs images onto paper media.
Here, as the application software to produce documents, well known is application software which works on the basis of a specification called “XPS” which describes documents with the format of XML (Extensible Markup Language). Document data (hereafter, referred to XPS data) produced on the basis of the XPS make it possible to conduct a direct printing process, and in recent years, an image forming apparatus capable of handling the XPS data has been provided. With regard to the XPS specification, for example, the following document discloses about it in detail.
XML Paper Specification Version 1.0 (http://www.microsoft.com/japan/whdc/xps/xpsspec.mspx)
In the case of instructing printing by the use of document data produced by ordinary application software, a host computer produces print data added with a PJL (Printer Job Language) command describing print setting information, such as the number of print sets, the designation of duplex print and the size of print sheets at the head of document data, and transmits the print data to an image forming apparatus. Then, the image forming apparatus analyzes the PJL command and stores the print setting information in a predetermined memory region. Thereafter, the image forming apparatus conducts a printing process with reference to the print setting information.
On the other hand, in the case of conducting a direct printing process by the use of XPS data, a host computer produces print data added with a PJL command describing print setting information at the head of XPS data, and transmits the print data to an image forming apparatus. Here, the XPS data is configured with a plurality of parts in which there is a part called “Print Ticket”. In the Print Ticket, the same as the above PJL command, print setting information, such as the number of print sets, the designation of both side printing and the size of print sheets can be described. Therefore, if a PJL command is added to XPS data in which print setting information is described in a Print Ticket, print data is eventually provided with two pieces of print setting information in which one is specified by the PJL command and another one is specified by the Print Ticket.
In this case, an image forming apparatus firstly analyzes the PJL command and stores the print setting information specified by the PJL command in a predetermined memory region. Thereafter, the image forming apparatus further analyzes the XPS data and stores the print setting information described by the Print Ticket in the above predetermined memory region by overwriting the previously stored print setting information. Accordingly, the print setting information of the Print Ticket in the XPS data is given priority over the print setting information of the PJL command. As a result, although print setting is conducted with the PJL command, a problem that printing is conducted in accordance with print setting in the Print Ticket in the XPS data, eventually arises.
Concretely, as shown in FIG. 8, a conventional image forming apparatus capable of conducting a direct printing process with XPS data is equipped with a data analyzing section 34a, a Print Ticket analyzing section 34b, a print control section 34d, a printing section 34e, an engine 35 and a print setting information holding area 33a. In such an image forming apparatus structured with the above sections, before receiving print data, default data (data held inside) as shown in a part [1] is stored in each setting item in the print setting information holding area 33a. As such setting items in the part [1], “Copies” representing the number of copy sets is set to “1”, “Duplex” representing the designation of duplex print is set to “OFF”, and “Paper” representing the size of print paper is set to “A4”.
In the case where XPS data added with a PJL command are transmitted, operations are conducted as shown in FIGS. 9 and 10. Firstly, the data analyzing section 34a reads print data from a host computer 20 at Step S201 in FIG. 10, and analyzes the print data at Step S202 so as to judges whether a PJL command has been added at the head of XPS data. As a result of the judgment, in the case where a PJL command has been added, the data analyzing section 34a analyzes the PJL command at Step S203, and stores print setting information described in the PJL command in the print setting information holding area 33a at Step S204. Here, since instructions to set the number of copy sets to “3” and the designation of duplex print to “ON” have been written in the PJL command, the data analyzing section 34a sets “Copies” to “3” and “Duplex” to “ON” in accordance with the instructions as shown in a part [2] in FIG. 9.
Subsequently, the data analyzing section 34a judges at Step S205 whether XPS data is included in the print data. In the case where XPS data does not exist in the print data, since data to be printed does not exist, the operation flow is ended. On the other hand, in the case where XPS data exists in the print data, at Step S206, the data analyzing section 34a judges whether a Print Ticket is included in the XPS data.
In the case where a Print Ticket exists in the XPS data, the data analyzing section 34a transmits the Print Ticket to the Print Ticket analyzing section 34b. Then, the Print Ticket analyzing section 34b analyzes the Print Ticket at Step S207, and stores print setting information described in the Print Ticket in the print setting information holding area 33a at Step S208. Here, since instructions to set the number of copy sets to “1”, the designation of duplex print to “OFF” and the size of print sheets to “Letter” has been written in the Print Ticket, the Print Ticket analyzing section 34b sets “Copies” to “1”, “Duplex” to “OFF” and “Paper” to “Letter” in accordance with the instructions as shown in a part [3] in FIG. 9.
Thereafter, at Step S209, the print control section 34d instructs the printing section 34e to print with reference to the print setting information stored in the print setting information holding area 33a, and the printing section 34e makes the engine 35 conduct a printing process.